package consumer.controller;

import consumer.feign.ProducerService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    private final Logger logger = LoggerFactory.getLogger(HelloController.class);

    @Autowired
    private ProducerService producerService;
    @RequestMapping("/hello")
    public String index(@RequestParam String name) {
        String str =  producerService.hello(name);
        return str;
//        return "hello "+name+"，this is first messge spring-cloud-consumer-z";
    }

}
